button4 2.2.1
Loading...
Searching...
No Matches
button4.h
Go to the documentation of this file.
1/****************************************************************************
2** Copyright (C) 2026 MikroElektronika d.o.o.
3** Contact: https://www.mikroe.com/contact
4**
5** Permission is hereby granted, free of charge, to any person obtaining a copy
6** of this software and associated documentation files (the "Software"), to deal
7** in the Software without restriction, including without limitation the rights
8** to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9** copies of the Software, and to permit persons to whom the Software is
10** furnished to do so, subject to the following conditions:
11** The above copyright notice and this permission notice shall be
12** included in all copies or substantial portions of the Software.
13**
14** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
16** OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18** DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
19** OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20** USE OR OTHER DEALINGS IN THE SOFTWARE.
21****************************************************************************/
22
27
28#ifndef BUTTON4_H
29#define BUTTON4_H
30
31#ifdef __cplusplus
32extern "C"{
33#endif
34
39#ifdef PREINIT_SUPPORTED
40#include "preinit.h"
41#endif
42
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
45 #include "delays.h"
46 #endif
47#endif
48
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51
57
62
67
72#define BUTTON4_BUTTON_ACTIVE 0
73#define BUTTON4_BUTTON_RESET 1
74 // button4_set
76
81
86
91#define BUTTON4_MAP_MIKROBUS( cfg, mikrobus ) \
92 cfg.out = MIKROBUS( mikrobus, MIKROBUS_INT )
93 // button4_map // button4
96
101typedef struct
102{
103 digital_in_t out;
104
105} button4_t;
106
111typedef struct
112{
113 pin_name_t out;
114
116
121typedef enum
122{
125
127
133
144
159
170
171#ifdef __cplusplus
172}
173#endif
174#endif // BUTTON4_H
175 // button4
177
178// ------------------------------------------------------------------------ END
button4_return_value_t
Button 4 Click return value data.
Definition button4.h:122
@ BUTTON4_ERROR
Definition button4.h:124
@ BUTTON4_OK
Definition button4.h:123
uint8_t button4_get_out_pin(button4_t *ctx)
Button 4 get out pin function.
err_t button4_init(button4_t *ctx, button4_cfg_t *cfg)
Button 4 initialization function.
void button4_cfg_setup(button4_cfg_t *cfg)
Button 4 configuration object setup function.
Button 4 Click configuration object.
Definition button4.h:112
pin_name_t out
Definition button4.h:113
Button 4 Click context object.
Definition button4.h:102
digital_in_t out
Definition button4.h:103